<html>
<head>
<title> monitor</title>
</head>
<body>

hello aaa
<div id="container" style="height: 400px; min-width: 310px"></div>
<script src='/static/jquery.js'></script>
<script src='/static/highstock.js'></script>
<script src='/static/exporting.js'></script> <!-- 导出pdf的js-->

<script>

$.getJSON('/data', function (data) {
    // Create the chart
    Highcharts.stockChart('container', {
      chart:{
           events:{
            load:function(){
                var series = this.series[0]
                setInterval(function(){
                  $.getJSON('/data',function(res){
                    $.each(res,function(i,v){
                        series.addPoint(v)
                })
                      
               })
                },3000)
             }
             }
           },

        rangeSelector: {
            selected: 1
        },

        title: {
            text: 'Memory'
        },

        series: [{
            name: 'Used',
            data: data,
            tooltip: {
                valueDecimals: 2
            }
        }]
    });
});


</script>
</body>

</html>
